package converter;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;

public class PlatoConverter implements Converter {


	public Object getAsObject(FacesContext arg0, UIComponent arg1, String arg2) {
		//System.out.println("getAsObject: " + arg2);
		PlatoDO p = new PlatoDO();
		p.setId(arg2);		
		return p;
	}

	public String getAsString(FacesContext arg0, UIComponent arg1, Object arg2) {
		//System.out.println("getAsString: " + arg2.toString());
		PlatoDO p = (PlatoDO) arg2;		
		return p.getId();
	}

}
